from django.conf.urls import url
from rest_framework_jwt.views import obtain_jwt_token
from . import views

urlpatterns = [
    url('^usernames/(?P<username>\w{5,20})/count/$', views.UsernameCountView.as_view()),# 查询用户名是否存在，并统计个数
    url('^mobiles/(?P<mobile>1[3-9]\d{9})/count/$', views.MobileCountView.as_view()),# 查询手机号是否存在并统计个数
    url('^users/$',views.RegisterView.as_view()),# 注册：创建新用户对象
    url(r'^authorizations/', obtain_jwt_token),
    url('user/$',views.UserView.as_view()),
]
